package wusiyuan.dao.impl;

import java.sql.SQLException;

import org.apache.commons.dbutils.QueryRunner;
import util.C3P0Util;
import wusiyuan.dao.RemoveTheAddressDao;

public class RemoveTheAddressDaoImpl implements RemoveTheAddressDao {

	@Override
	public Integer RemoveTheAddress(String consignee, String phone) {
		Integer i=0;
		QueryRunner qr = new QueryRunner(C3P0Util.getDataSource());	
		String sql="delete from user_addr where consignee = ? and phone = ? ";
        Object[] pram={consignee,phone};
		try {
			i = qr.update(sql, pram);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return i;
	}

}
